package com.itstyle.seckill.common.aop;

import com.itstyle.seckill.web.SeckillController;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * @author duzining
 */
@Component
@Aspect
public class TestAnnotationAspect {


    private final static Logger LOGGER = LoggerFactory.getLogger(SeckillController.class);

    @Pointcut("@annotation(com.itstyle.seckill.common.aop.TestAnnotation)")
    public void testAnnotationAspect(){
    }

    @Around("testAnnotationAspect()")
    public void around(){
        try {
            LOGGER.info("proceed获取的对象:{}","啊了啊");
        } catch (Throwable e) {
            e.printStackTrace();
        }

    }
}
